package cn.wp.test;

import cn.wp.common.core.generate.*;
import cn.wp.common.core.generate.meta.Author;
import cn.wp.common.core.generate.meta.Table;

public class Demo {

    public static void main(String[] args) {
       /* Demo demo = new Demo();
        Demo3 demo3 = new Demo3();
        demo3.print();
        demo.go();*/
        GenerateCode template = new GenerateAllTemplate();
        Table table = new Table();
        table.setCode("bs_role_info");
        table.setName("角色信息");

        Author author = new Author();
        //author.setName("chenyb");

        String result = template.genCode(table,author);
        System.err.println(result);
    }
    
    public void go(){
        StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
        for(StackTraceElement s : stackTrace){
            System.out.println("类名：" + s.getClassName() + "  ,  java文件名：" + s.getFileName() + ",  当前方法名字：" + s.getMethodName() + ""
                    + " , 当前代码是第几行：" + s.getLineNumber() + ", " );
        }
    }
    
}